fix(app-shell): point the remaining four Settings senders at /apps/setup/system (#3611) - #3637
Merged
Merged
Conversation
…tup/system (#3611) objectui#3590 / PR #3608 fixed the three call sites inside its declared file surface. These four were outside it and kept the bare `/apps/setup` — which, because `AppContent` mounts the system hub only under `isSystemRoute`, is the "No Apps Configured" empty state's own URL on a zero-app deployment. Every one of them looped in place there. Three are live defects: - `AppSidebar`'s no-active-app sidebar header (`system-sidebar-header`), which renders ONLY when there is no active app — unreachable except in exactly the state where its target was broken. - `AppSidebar`'s user-menu "Settings" entry. - `SystemRedirect`'s bare `/system` legacy bookmark. The forwarder was already half right (every suffixed bookmark was rewritten to `/apps/setup/system…` correctly); the bare branch now agrees with the suffixed branch beside it. No new logic. The fourth, `QuickActions`' "System Settings" card, is dormant — the component has zero JSX call sites repo-wide, so no user reaches it today. Corrected in the same pass so the dead link cannot return with the component if it is ever remounted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 7, 2026 16:47
This was referenced Aug 7, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3611
背景
#3590 / PR #3608 已修掉其文件面内的三个调用点。本单是它明确声明的剩余部分:同一根因、同一取值,但落在 #3590 的文件面之外。
根因:
AppContent只在isSystemRoute(pathname.includes('/system'))成立时挂载系统枢纽。裸/apps/setup因此匹配不到除isSetupRoute外的任何伪路由,落回!activeApp && …守卫 —— 在零应用部署下,它就是「No Apps Configured」空态自己的 URL。凡是拼这个裸 URL 的入口,在那里都原地打转。PM 裁决:「System Settings」语义恒等于系统枢纽,四处统一
/apps/setup/system(该 URL 在有/无 activeApp 两个分支下都可解析:分别经extraRoutes与extraRoutesNoApp)。常量替换,无行为分叉。四处前后对照(3 活 1 眠)
layout/AppSidebar.tsx:461system-sidebar-headernavigate('/apps/setup')navigate('/apps/setup/system')layout/AppSidebar.tsx:695user.settings「Settings」navigate('/apps/setup')navigate('/apps/setup/system')console/ConsoleShell.tsx:384SystemRedirect裸/system旧书签suffix ? '/apps/setup/system' + suffix : '/apps/setup'… : '/apps/setup/system'console/home/QuickActions.tsx:51id: 'system-settings'「System Settings」卡片href: '/apps/setup'href: '/apps/setup/system'三个「活」缺陷
零应用部署下今天真实可达。其中
system-sidebar-header最尖锐:它只在activeApp为假时渲染 —— 也就是说,除了「其目标恰好失效」的那个状态,它根本无法被触达。SystemRedirect值得单独一句:它本来就有一半是对的 —— 带后缀的旧书签(/system/users)一直被正确改写成/apps/setup/system/users,只有裸/system丢掉了那个system段。本 PR 让裸分支与它旁边的带后缀分支自洽,不加任何新逻辑。一个「眠」代码
QuickActions全仓零 JSX 调用点(仅由console/home/index.ts导出,无人渲染),今天没有用户能碰到它,因此这一处没有用户可见的行为变化。仍在本次一并改掉:成本为零,而代价是 —— 只要有人把它挂回 HomePage,这条死链就会跟着一起回来。对应测试直接渲染该组件(休眠代码的诚实作用域),并把「零调用点」这一前提本身写成断言:有人挂回时它会变红,提示重读该文件。测试
新增三个测试文件:
layout/__tests__/appSidebarSettingsTargets.test.tsx—— 站点 1、2console/__tests__/systemRedirectTarget.test.tsx—— 站点 3console/home/__tests__/QuickActions.settingsTarget.test.tsx—— 站点 4SystemRedirect的测试按真实消费者(apps/console/src/App.tsx、examples/console-starter/src/App.tsx)的写法声明路由path="/system/*"—— splat 同样匹配裸/system(空 splat),这正是那条缺陷分支的可达路径。命令与结果(仓根,canonical invocation):
逆向验证(先预测方向,后运行)
保留三个新测试文件、把三个源文件回退到
origin/main,逐条预测方向后再跑:sys-settingshref(#3590 已修,本 PR 未动)/system→ 枢纽逐条方向全部命中:标红的 5 条正是失败的 5 条,标绿的 5 条全部通过(
Tests 5 failed | 5 passed (10))。失败文本即预期形状:一处如实记录:我在汇总时把表头总数写成了「4 红 / 6 绿」,逐行预测实为 5 红 / 5 绿 —— 是我自己的加总笔误,逐条方向本身没有错。按「模板是工具而非事实」如实记下,不粉饰。
与在途单的隔离
layout/__tests__/systemNavSettingsTarget.test.tsx(正被在途 console: /home 的 Administration 组被压平成一条指向 /home 的死链——整簇 9 个系统管理入口在参考 console 上不可达 #3609 翻转)、UnifiedSidebar.tsx(console: /home 的 Administration 组被压平成一条指向 /home 的死链——整簇 9 个系统管理入口在参考 console 上不可达 #3609)、AppContent.tsx(console: 零应用下 sys-objects / sys-datasources 落到 /apps/setup/component/... 渲染空白屏——无-activeApp 分支既无 component/* 路由也无 catch-all #3610)。与两个在途单零文件相交。AppContent.tsx:187的isSetupRoute是路由匹配器而非导航目标,按规则不动 —— 裸/apps/setup在那里出现是正确的。system-sidebar-header/quick-action-*在源码、测试、e2e、docs 中除本 PR 新增测试外无其他引用。变更集
.changeset/remaining-setup-links-3611.md(@object-ui/app-shell: patch)—— 用户可见:零应用部署下侧栏头、用户菜单与旧/system书签的 Settings 入口不再原地打转。🤖 Generated with Claude Code
https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
Generated by Claude Code